<?php
use Mirage\Base\Config;
use Mirage\Web;
use Mirage\Util\ClientScript;
/**
 * Description of AccomReportModule
 *
 * @author bry
 */
class AccomReportModule extends Mirage\Abstraction\AbstractModule{
    public function initialize() {
        $reportPath = Web::app()->getModulePath() . DIRECTORY_SEPARATOR . 'report' . DIRECTORY_SEPARATOR;
        $this->setControllerPath($reportPath . 'controllers');
        $this->setErrorHandler('Error', 'error404');
        $this->defaultController = 'Task';
        \Mirage\Autoload::directoryAutoload(array(
            __DIR__.'/components',
            __DIR__.'/forms',
            __DIR__.'/models'
        ));
        ClientScript::app()
                ->setPublish(Config::app()->param['isPublishAsset'])
                ->setAssetsPath(Web::app()->getBasePublicPath() . DIRECTORY_SEPARATOR . 'assets')
                ->publish(Web::app()->getModulePath() . DIRECTORY_SEPARATOR . 'report' . DIRECTORY_SEPARATOR . 'assets');
    }
    
}

?>
